home *** CD-ROM | disk | FTP | other *** search
/ Best of Shareware / Best of PC Windows Shareware 1.0 - Wayzata Technology (7111) (1993).iso / mac / DOS / UTILITY / SPARKL31 / MENU.BAT < prev    next >
DOS Batch File  |  1992-08-12  |  2KB  |  56 lines

  1. echo off
  2. cls
  3. echo            Here's an example of how to create a menu using Sparkle.
  4. rem
  5. rem  ---- First display a window (option #6):
  6. rem       Display some color; then pop up a window with a shadow (thus the "-2").
  7. rem
  8. sparkle 6 4 1 20 80 32 32 /
  9. sparkle 6 5 10 18 71 79 -2 /... Main Menu ...
  10. rem
  11. rem  ---- 2nd, print the 4 menu options (plus Quit)
  12. rem
  13. sparkle 5 8  31   112 /── This is option 1 ──
  14. sparkle 5 10 31   112 /── This is option 2 ──
  15. sparkle 5 12 31   112 /── This is option 3 ──
  16. sparkle 5 14 31   112 /── This is option 4 ──
  17. sparkle 5 16 31   112 /──       Quit       ──
  18. rem
  19. rem  ---- Now we tell Sparkle to turn this into a VERTICAL Bar menu (direction = 1)
  20. rem       Option # = 2.  Screen coordinates 7, 30 (top left) to 16, 53 (bottom right).
  21. rem                      Highlight options using color 15 (bright white on black)
  22. sparkle 2 7 30 16 53 15 1
  23. rem
  24. rem  ---- add your own lines here to test Errorlevel
  25. rem
  26. If Errorlevel 88 Goto Error
  27. If Errorlevel 27 Goto EscPressed
  28. If Errorlevel  5 Goto 5thOption
  29. If Errorlevel  4 Goto 4thOption
  30. If Errorlevel  3 Goto 3rdOption
  31. If Errorlevel  2 Goto 2ndOption
  32. If Errorlevel  1 Goto 1stOption
  33. Goto End
  34. :Error
  35. echo An error must have occurred.  Possibly someone changed this and I can't find
  36. echo or process the menu.  Sorry.  Check the batch file.
  37. goto end
  38. :EscPressed
  39. echo You pressed Escape.
  40. goto end
  41. :1stOption
  42. echo You selected the 1st option
  43. goto end
  44. :2ndOption
  45. echo You selected the 2nd option
  46. goto end
  47. :3rdOption
  48. echo You selected the 3rd option
  49. goto end
  50. :4thOption
  51. echo You selected the 4th option
  52. goto end
  53. :5thOption
  54. echo You selected the 5th option -- Quit
  55. :End
  56.